@charset "UTF-8";
.news-add {
  padding: 0 20px;
}

.news-add .news-steps {
  margin-bottom: 24px;
}

.news-add .content-container {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.news-add .content-container .preview-mode {
  width: 65%;
}

.news-add .content-container .preview-sidebar {
  width: 35%;
}

.news-add .steps-content {
  margin-bottom: 24px;
  padding: 20px;
}

.news-add .steps-content.hidden-content {
  display: none;
}

.news-add .steps-content.show-content {
  display: block;
}

.news-add .news-form .cover-uploader .cover-preview {
  padding: 8px;
}

.news-add .news-form .cover-uploader .cover-preview img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.news-add .preview-content {
  padding: 10px;
}

.news-add .preview-content .preview-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 16px;
}

.news-add .preview-content .preview-meta {
  display: flex;
  gap: 16px;
  color: #666;
  margin-bottom: 16px;
  font-size: 14px;
}

.news-add .preview-content .preview-cover {
  text-align: center;
  margin: 16px 0;
}

.news-add .preview-content .preview-cover img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.news-add .preview-content .preview-body p {
  margin-bottom: 1em;
  font-size: 16px;
  line-height: 1.6;
}

.news-add .preview-content .preview-body img {
  max-width: 100%;
  height: auto;
}

.news-add .steps-action {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.news-add .steps-action .submit-actions {
  display: flex;
  gap: 16px;
}

.news-add .steps-action .prev-btn {
  margin-right: auto;
}

.news-add .auto-save-indicator {
  color: #52c41a;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.news-add .auto-save-indicator:before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #52c41a;
  margin-right: 6px;
  animation: pulse 1.5s infinite;
}

.news-draft {
  padding: 20px;
}

.news-draft h2 {
  margin-bottom: 20px;
  color: #1890ff;
}

.news-preview {
  padding: 20px;
}

.news-preview .title {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
}

.news-preview .info {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  color: #777;
}

.news-preview .info span {
  padding: 0 10px;
}

.news-preview .content {
  margin-top: 20px;
  padding: 0 20px;
}

.news-category {
  padding: 20px;
}

.news-category .editable-cell-value-wrap {
  padding: 5px 12px;
  cursor: pointer;
  min-height: 32px;
  line-height: 32px;
}

.news-category .editable-cell-value-wrap:hover {
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  padding: 4px 11px;
}

.error-message {
  padding: 20px;
  text-align: center;
  color: #f5222d;
  background-color: #fff1f0;
  border: 1px solid #ffccc7;
  border-radius: 4px;
  margin: 20px;
  font-size: 16px;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
}

.news-update {
  padding: 0 20px;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

.news-editor .quill {
  min-height: 350px;
}

.news-editor .quill .ql-editor {
  min-height: 300px;
  font-size: 16px;
  line-height: 1.6;
}

.news-editor .news-editor-tips {
  margin-top: 8px;
  color: #999;
  font-size: 12px;
  text-align: right;
}

@media (max-width: 768px) {
  .news-add .content-container {
    flex-direction: column;
  }
  .news-add .content-container .preview-mode,
  .news-add .content-container .preview-sidebar {
    width: 100%;
  }
  .news-add .news-form .ant-form-item-label {
    flex: 0 0 100px;
  }
}

/* 新闻相关页面通用样式 */
.news-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  /* 页面标题区域 */
  /* 新闻卡片容器 */
  /* 步骤条容器 */
  /* 每个步骤的内容容器 */
  /* 底部操作区域 */
  /* 动画效果 */
}

.news-container .page-header {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.news-container .news-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  padding: 20px;
}

.news-container .news-card .ant-card-body {
  display: flex;
  flex-direction: column;
  padding: 24px;
  height: 100%;
}

.news-container .steps-container {
  margin-bottom: 24px;
  flex-shrink: 0;
}

.news-container .step-content-container {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 320px);
  /* 限制高度，确保底部按钮可见 */
  margin-bottom: 24px;
  padding: 0 5px;
  border: 1px solid #f0f0f0;
  border-radius: 4px;
  /* 基本信息步骤 */
  /* 编辑器步骤 */
  /* 预览步骤 */
}

.news-container .step-content-container.basic-info-form {
  padding: 20px;
}

.news-container .step-content-container.editor-step-container {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.news-container .step-content-container.editor-step-container .news-editor {
  height: 100%;
  border: none;
}

.news-container .step-content-container.preview-step-container {
  padding: 10px;
}

.news-container .step-content-container.preview-step-container .preview-card {
  border: none;
  box-shadow: none;
}

.news-container .step-content-container.preview-step-container .preview-card .ant-card-body {
  padding: 10px;
}

.news-container .step-content-container.preview-step-container .preview-card .preview-title {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 24px;
}

.news-container .step-content-container.preview-step-container .preview-card .news-preview-content {
  font-size: 16px;
  line-height: 1.8;
}

.news-container .step-content-container.preview-step-container .preview-card .news-preview-content img {
  max-width: 100%;
  height: auto;
  margin: 16px auto;
  display: block;
}

.news-container .step-content-container.preview-step-container .preview-card .news-preview-content p {
  margin-bottom: 16px;
}

.news-container .step-content-container.preview-step-container .preview-card .news-preview-content h1, .news-container .step-content-container.preview-step-container .preview-card .news-preview-content h2, .news-container .step-content-container.preview-step-container .preview-card .news-preview-content h3, .news-container .step-content-container.preview-step-container .preview-card .news-preview-content h4, .news-container .step-content-container.preview-step-container .preview-card .news-preview-content h5, .news-container .step-content-container.preview-step-container .preview-card .news-preview-content h6 {
  margin: 24px 0 16px;
  font-weight: bold;
}

.news-container .step-content-container.preview-step-container .preview-card .news-preview-content ul, .news-container .step-content-container.preview-step-container .preview-card .news-preview-content ol {
  margin-left: 20px;
  margin-bottom: 16px;
}

.news-container .step-content-container.preview-step-container .preview-card .news-preview-content blockquote {
  padding-left: 16px;
  border-left: 4px solid #d9d9d9;
  color: #666;
  font-style: italic;
  margin: 16px 0;
}

.news-container .bottom-actions {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
  margin-top: auto;
}

.news-container .bottom-actions .left-actions {
  display: flex;
  gap: 8px;
}

.news-container .bottom-actions .right-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.news-container .bottom-actions .auto-save-indicator {
  display: flex;
  align-items: center;
  color: #52c41a;
  margin-right: 16px;
}

.news-container .bottom-actions .auto-save-indicator:before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #52c41a;
  display: inline-block;
  margin-right: 6px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

/* 新闻分类管理页面 */
.category-management .ant-table-wrapper {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.category-management .action-buttons {
  display: flex;
  gap: 8px;
}

/* 草稿箱页面 */
.draft-list .ant-table-wrapper {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .news-container .news-content-scroll-area {
    max-height: calc(100vh - 200px);
  }
  .news-container .news-content-scroll-area .editor-scroll-container {
    max-height: calc(100vh - 300px);
  }
  .news-container .news-list .ant-table-wrapper,
  .news-container .category-management .ant-table-wrapper,
  .news-container .draft-list .ant-table-wrapper {
    max-height: calc(100vh - 240px);
  }
}
